﻿// Author: Jin Qing (http://blog.csdn.net/jq0123)

#include "client_mailbox.h"

#include "rpc/rpc_resp_data.h"  // for CRpcRespData
#include <google/protobuf/message.h>  // for Message

CClientMailBox::CClientMailBox()
{
}

void CClientMailBox::PushRpcResp(uint32_t uRpcId,
	const google::protobuf::Message& response)
{
	RpcDataSptr pRpc = std::make_shared<CRpcRespData>(
		uRpcId, response.SerializeAsString());
	PushRpcData(pRpc);
}

void CClientMailBox::PushRpcResp(uint32_t uRpcId,
	const std::string& sResponse)
{
	RpcDataSptr pRpc = std::make_shared<CRpcRespData>(
		uRpcId, sResponse);
	PushRpcData(pRpc);
}


